package com.hua.designpattern.j2eepattern.servicelocator;

public class JNDIConcrete {

	public ServiceInterface lookup(String jndiName) {
		if (ServiceEJB.name.equalsIgnoreCase(jndiName)) {
			return new ServiceEJB();
		} else if (ServiceJMS.name.equalsIgnoreCase(jndiName)) {
			return new ServiceJMS();
		} else {
			return null;
		}
	}

}
